local awful     = require("awful")
local beautiful = require("beautiful")
local menubar   = require("menubar")


myLogoutMenu = {
    { "Suspend",  function() awful.spawn("loginctl suspend")  end },
    { "Logout",   function() awful.quit()                     end },
    { "Restart",  function() awful.spawn("loginctl reboot")   end },
    { "Shutdown", function() awful.spawn("loginctl poweroff") end },
}

mymainmenu = awful.menu({
    items = {
        { "logout",  myLogoutMenu,  beautiful.awesome_icon },
    },
})

mylauncher = awful.widget.launcher({
    image = beautiful.awesome_icon,
    menu  = mymainmenu
})

-- Menubar configuration
menubar.utils.terminal = terminal -- Set the terminal for applications that require it

function show()
    awful.menu.show()
end
